{_include admin_menu}
<?php PageUtil::addVar("stylesheet","<link href=\"".$stylepath."/manageBrand.css\" rel=\"stylesheet\">");?>
<form action="<?php echo base_url('admin/brand/add'); ?>" method="post" class="form-horizontal" >
	<div class="left_content">		
		<legend>เลือกหมวดหมู่</legend>
		<div class="check_cat">
			<?php
				foreach ($categories as $keyCategory => $valueCategory) {
			?>
				<div class="column">
					<?php
						foreach ($valueCategory as $keyCategoryItem => $valueCategoryItem) {
					?>
						<label class="checkbox">
							<input type="checkbox" name="categories[]" value="<?php echo $valueCategoryItem["id"];?>" <?php if(!empty($valueCategoryItem['check'])) echo "checked"; ?>><?php echo $valueCategoryItem["name"]; ?>
						</label>
					<?php
						}
					?>
				</div>
			<?php
				}
			?>
		</div>
		<legend>ยี่ห้อ</legend>
			<div class="control-group">
			<label class="control-label">ยี่ห้อ</label>
			<div class="controls">
				<input type="hidden" name="id" value="<?php if(!empty($brand[0]['id'])) echo $brand[0]['id']; ?>">
				<input type="text" name="name" value="<?php if(!empty($brand[0]['name']))echo $brand[0]['name']; ?>" >
			</div>
		</div>

		<div class="control-group">
			<div class="controls">
				<button type="submit" class="btn btn-primary" id="submitbtn" name="submit" value="submit">Submit</button>
				<button type="reset" class="btn">Cancel</button>
			</div>
		</div>
	</div>
</form>
